package com.sg.controller.bff;

import com.sg.service.biz.bff.ExecuteProgressService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "ExecuteProgress", tags = {"ExecuteProgress"})
@RestController
// @RequestMapping("/oms/executeProgress/")
public class ExecuteProgressController {

    @Autowired
    ExecuteProgressService executeProgressService;

    /**
     * B3获取执行进度情况(公共)
     * gen by moon at 5/27/2023, 10:09:01 PM
     */
    @PostMapping("/oms/executeProgress/obtainExecuteProgressComBorder")
    @ApiOperation(value = "B3获取执行进度情况(公共)", response = OkrResult.class)
    public OkrResult<BffObtainExecuteProgressComBorderRespDto> obtainExecuteProgressComBorder(@RequestBody(required = false) @Validated BffObtainExecuteProgressComBorderReqDto reqDTO) {
        return OkrResult.success(executeProgressService.obtainExecuteProgressComBorder(reqDTO));
    }

    /**
     * B3重置执行进度处理(公共)
     * gen by moon at 6/12/2023, 8:38:22 PM
     */
    @PostMapping("/oms/executeProgress/resetExecuteProgressDisposeCom")
    @ApiOperation(value = "B3重置执行进度处理(公共)", response = OkrResult.class)
    public OkrResult<BffResetExecuteProgressDisposeComRespDto> resetExecuteProgressDisposeCom(@RequestBody(required = false) @Validated BffResetExecuteProgressDisposeComReqDto reqDTO) {
        return OkrResult.success(executeProgressService.resetExecuteProgressDisposeCom(reqDTO));
    }
}
